﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Model.SimpleFlow
{
    /// <summary>
    /// 申请记录
    /// </summary>
    [Serializable]
    public class ApprovalRecord : Entity
    {
        /// <summary>
        /// 申请记录标题
        /// </summary>
        public virtual string Title { get; set; }

        /// <summary>
        /// 申请记录内容
        /// </summary>
        public virtual string Content { get; set; }

        /// <summary>
        /// 流程申请记录创建者
        /// </summary>
        public virtual ywxt.t_sys_user Creator { get; set; }

        /// <summary>
        /// 流程申请记录的类型
        /// </summary>
        public virtual ApprovalRecordType Type { get; set; }

        /// <summary>
        /// 流程申请记录对应的业务数据记录的源头ID
        /// </summary>
        public virtual string SourceId { get; set; }

        /// <summary>
        /// 申请记录的状态
        /// </summary>
        public virtual DB_Common.SimpleFlowStatus Status { get; set; }

        /// <summary>
        /// 申请记录的审批历史
        /// </summary>
        public virtual IList<ApprovalNode> Nodes { get; set; }

        /// <summary>
        /// 申请记录的待办
        /// </summary>
        public virtual IList<ApprovalToDo> ToDos { get; set; }

        /// <summary>
        /// 申请记录的附件
        /// </summary>
        public virtual IList<ApprovalAttachment> Attachments { get; set; }

        public ApprovalRecord()
        {
            Nodes = new List<ApprovalNode>();
            ToDos = new List<ApprovalToDo>();
            Attachments = new List<ApprovalAttachment>();
        }
    }
}
